import Layout from '@/layout'
export default {
  path: '/employees',
  component: Layout,
  children: [
    {
      // 二级路由
      // 如果子路由路径''是空字符串，当前路径默认匹配
      path: '',
      name: 'employees',
      component: () => import('@/views/employees/employees.vue'),
      meta: { title: '员工管理', icon: 'people' }
    },
    // 路径传参
    // {
    //   path: `detail/:userId`, // 路径传参的时候，路径需要接受
    //   name: 'detail',
    //   component: () => import('@/views/employees/detail.vue'),
    //   hidden: true
    // },
    // 查询参数参数传参
    {
      path: 'detail',
      name: 'detail',
      component: () => import('@/views/employees/detail.vue'),
      hidden: true
    },
    {
      path: 'print/:id', // 二级默认路由
      name: 'print',
      component: () => import('@/views/employees/components/print.vue'), // 按需加载
      hidden: true

    }
  ]
}
